package com.kun.config;

import com.kun.bean.Person;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

/**
 * 测试@Scope注解设置的作用域
 * @author fangkun
 *
 */
@Configuration
public class MainConfig3 {

    @Scope("thread")
    @Bean("person")
    public Person person() {
        System.out.println("给容器中添加咱们这个Person对象...");
        return new Person("熏悟空", 25);
    }

}
